<script setup lang="ts">
import { watch, ref } from "vue";
import { useRoute } from "vue-router";

const
  route = useRoute(),
  show = ref(false),
  // nav = ref<any[]>([]),
  index = ref("");

async function init() {
  // nav.value = getTreeElMenuData(route.matched[0].children as any);
  show.value = true;
}
init();
watch(route, n => {
  index.value = (n.name || "").toString();
}, { immediate: true });
</script>
<template>
  <div class="index whf x" v-if="show">
    <!-- <TreeElMenu :data="nav" class="zbl" v-model="index" /> -->
    <RouterView />
  </div>
</template>
